package com.mimose.cosy.proxy.api;

import com.mimose.cosy.proxy.enums.ProxyType;

import javax.annotation.Nonnull;
import java.lang.reflect.Method;

/**
 * @author mimose
 * @description proxy api
 * @date 2021/4/24
 */
public interface IProxy {

    ProxyType proxyType();

    Object wrap(@Nonnull Object proxyTarget);

    void beforeInvoke(Method method, Object[] args);

    void afterInvoke(Object result, Method method, Object[] args);

    void afterThrowing(Throwable throwable, Method method, Object[] args);
}
